import axios from 'axios';
import {get} from '../utils/Storage';
axios.interceptors.request.use( async config => {
    config.headers['Authorization'] = 'bearer '+  await get("token");
    return config;
});
// axios.interceptors.response.use(response => {
//     return response;
// },error => {
//     if(error.response.status == 401){
//         // window.location = "/login";
//     }
//     return Promise.reject(error.response.data);
// })



export default axios
// export const url = "/api";
// export const url = "http://localhost:3001"
export const url = "http://172.16.1.134:3001"